%h1.song= "Edit " + @song.name
%table.song
  - form_for @song, songs_url, :method => :put do |form|
    %tr
      %td.field_title Name:
      %td.field= form.text_field      :name
      %td.error= error_message_on     :song, :name
    %tr
      %td.field_title Track:
      %td.field= form.text_field      :track
      %td.error= error_message_on     :song, :track
    %tr
      %td.field_title Lyrics:
      %td.area= form.text_area        :lyrics
      %td.error= error_message_on     :song, :lyrics
    %tr
      %td.field_title Purchase Link:
      %td.field= form.text_field      :purchase_link
      %td.error= error_message_on     :song, :purchase_link
    %tr
      %td.field_title Album:
      %td.select_field 
        %select{:name => "song[album_id]"}
          %option{:value => ''}none
          - @albums.each do |album|
            %option{:value => album.id, :selected => ('selected' if album == @song.album)}= album.name
        or create a
        %a{:href => new_album_url, :title => "Create a new Album", :alt => "Create a new album"}new one 
    %tr
      %td.submit= submit_tag 'Update'
  - form_for @song, songs_url, :html => {:method => :delete} do |form|      
    %tr
      %td.submit= submit_tag 'Delete'